import http from '@/api/index'
/* 分页查询 */
export function selectByPage (params) {
  return http.get('/purchase/list', { params })
}
/* 按 id 查询 */
export function selectById (id) {
  return http.get('/purchase/' + id)
}
/* 新增 */
export function insert (applyFund, data) {
  return http.post('/purchase?applyFund=' + applyFund, data)
}
/* 修改 */
export function update (data) {
  return http.put('/purchase/detail', data)
}
/* 审批 */
export function changeStatus (data) {
  return http.put('/purchase', data)
}
/* 删除 */
export function remove (id) {
  return http.delete('/purchase/' + id)
}
